package com.nervenets.shopping.controller.user.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class SystemStateVo implements Serializable {
    @ApiModelProperty(value = "成团数量")
    private long groupSuccessCount;
    @ApiModelProperty(value = "拼友数量")
    private long groupUserCount;
    @ApiModelProperty(value = "公益金总额")
    private long sumOfContribution;
    @ApiModelProperty(value = "分红总额")
    private long sumOfBonus;
    @ApiModelProperty(value = "奖金总额")
    private long sumOfReward;
    @ApiModelProperty(value = "订单总额")
    private long sumOfOrderMoney;
    @ApiModelProperty(value = "退款总额")
    private long sumOfRefundMoney;

    public long getProfit() {
        return this.sumOfOrderMoney - this.sumOfRefundMoney - this.sumOfReward - this.sumOfBonus - this.sumOfContribution;
    }
}
